﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebFormHuffmanCode.aspx.cs" Inherits="WebClient.WebFormHuffmanCode" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 300px;
        }
        .style2
        {
            width: 150px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div align = "center" style="width: 100%;">
    <asp:Label ID="LabelHeader" runat="server" Font-Size="Large" 
            Text="Huffman coding"></asp:Label>
        <br />
        <br />
        <table cellpadding="5" frame="border" style="width: auto; height: auto;">
            <tr>
                <td class="style1" align="left">
                    <asp:Label ID="LabelCharacterString" runat="server" Text="Character string "></asp:Label>
                    <asp:TextBox ID="TextBoxString" runat="server" Height="88px" Width="300px" 
                        TextMode="MultiLine" ontextchanged="TextBoxString_TextChanged" 
                        AutoPostBack="True"></asp:TextBox>
                </td>
                <td align="left" class="style2">
                    <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
                    <br />
                    <asp:TextBox ID="TextBoxCharToCode" runat="server" Height="88px" Width="140px" 
                        TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left" class="style1" colspan="2">
                   <asp:Button ID="ButtonBuildTree" runat="server" Text="Build tree" 
                         onclick="ButtonBuildTree_Click" />
                    &nbsp;
                    <asp:Button ID="ButtonEncode" runat="server" Text="Encode" 
                        onclick="ButtonEncode_Click" Enabled="False" />
                    
                </td>
            </tr>
            <tr>
               <td class="style1" align="left">
                    <asp:Label ID="LabelHuffmanCode" runat="server" Text="Huffman code"></asp:Label>
                    <asp:TextBox ID="TextBoxCode" runat="server" Height="88px" Width="300px" 
                        TextMode="MultiLine" ontextchanged="TextBoxCode_TextChanged" 
                        Enabled="False"></asp:TextBox>
                </td>
                <td align="left" class="style2">
                    <asp:Label ID="Label3" runat="server" Text=""></asp:Label>
                    <br />
                    <asp:TextBox ID="TextBoxCodeToChar" runat="server" Height="88px" Width="140px" 
                        ReadOnly="True" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left" class="style1" colspan="2">
                    <asp:Button ID="ButtonDecode" runat="server" Text="Decode" 
                        onclick="ButtonDecode_Click" Enabled="False" />
                </td>
            </tr>
            <tr>
                <td align="left" class="style1" colspan="2" style="height: auto" valign="top">
                    <asp:Label ID="LabelLog" runat="server" Text="Log: "></asp:Label>
                    <br />
                    <asp:TextBox ID="TextBoxLog" runat="server" Height="100px" Width="492px" 
                        TextMode="MultiLine" ReadOnly="True"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="left" class="style1" colspan="2">Log format:
                                    <asp:RadioButtonList ID="RadioButtonList" runat="server" 
                        onselectedindexchanged="RadioButtonList_SelectedIndexChanged" Width="121px">
                        <asp:ListItem Selected="True">txt</asp:ListItem>
                        <asp:ListItem>html</asp:ListItem>
                    </asp:RadioButtonList>
                    </td>
            </tr>
            <tr>
                <td align="left" class="style1" colspan="2">
                    <asp:Label ID="LabelStatus" runat="server" ForeColor="#0033CC"></asp:Label>
                </td>
            </tr>
        </table>        
    </div>
    </form>
</body>
</html>
